// --------------------------------------------------------------------------
//! Define a lazy property.
// --------------------------------------------------------------------------

#define lazyProperty(type, name, ...)		\
@property (__VA_ARGS__) type name; \
- (type) name##LazyInit;

// --------------------------------------------------------------------------
//! Synthesize a lazy property.
// --------------------------------------------------------------------------

#define lazySynthesize(type, name)		\
@synthesize name; \
- (type) name { if (!name) self.name = [self name##LazyInit]; return name; }


#define lazyReadOnlySynthesize(type, name)		\
@synthesize name; \
- (type) name { if (!name) name = [[self name##LazyInit] retain]; return name; }

